import { Statistic, Row, Col } from 'antd'
import React,{Component} from 'react'
import Time from '../../common/time';
/**
 * 名称：总计
 * 描述：总计
 * 调用：营销效果中心
 * 输入：store 营销数据
 * 时间：20220404
 */
class TotalStatistic extends Component{
    

    onFinish = ()=> {
    console.log('finished!');
    }

    

    render(){
        const {store} = this.props
        const countData = store.countData || {}
        const totalCrowdNumTitle=<span style={{color:"#ccc"}}>总人数</span>
        const activityNumTitle=<span style={{color:"#ccc"}}>活动数</span>
        const tagNumTitle=<span style={{color:"#ccc"}}>标签数</span>
        const joinRateTitle=<span style={{color:"#ccc"}}>流量(/每分钟)</span>

        return (
        <Row gutter={16} >
            <Col span={12}>
            <Statistic title={totalCrowdNumTitle} valueStyle={{ color: '#ccc' }}  value={countData.totalCrowd} onFinish={this.onFinish} />
            </Col>
            <Col span={12}>
            <Statistic title={activityNumTitle} valueStyle={{ color: '#ccc' }}  value={countData.activityNum} />
            </Col>
            
            <Col span={12} >
            <Statistic title={tagNumTitle} valueStyle={{ color: '#ccc' }}  value={countData.tagNum}/>
            </Col>
            <Col span={12}>
                <Time/>
            </Col>
            <Col span={24}>
            <Statistic title={joinRateTitle} valueStyle={{ color: '#ccc' }}  value={countData.flow} />
            
            </Col>
            
        </Row>
        
        )
    }
}
export default TotalStatistic